﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<Ezio.Models.Menus>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Menus
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        Men&uacute;s
    </h2>
    <span class="highlight" id="MenuMessages"></span>
    <div id="MenuPanel" class="floating-content-holder">
        <!--Listar menús-->
        <table id="MenuList" class="left-floating-content">
            <thead>
                <tr>
                    <td colspan="2">
                        <input type="button" name="NuevoMenu" id="NuevoMenu" value="Crear un nuevo menú" />
                    </td>
                </tr>
                <tr>
                    <th>
                        Nombre
                    </th>
                    <th>
                        Tipo Men&uacute;
                    </th>
                </tr>
            </thead>
            <tbody>
                <% foreach (var item in (List<Ezio.Models.Menus>)ViewData["Menus"])
                   { %>
                <tr id="<%: item.IdMenu%>">
                    <td>
                        <a href="#" class="nombre-menu">
                            <%: item.Nombre %>
                        </a>
                    </td>
                    <td>
                        <%: item.TiposMenus.NombreTipoMenu %>
                    </td>
                </tr>
                <% } %>
            </tbody>
        </table>
        <!-- Editar menú -->
        <form id="MenuForm" action="Menus/Agregar" method="post" class="left-floating-content">
        <%Html.RenderPartial("MenuEditor"); %>
        </form>
    </div>
</asp:Content>
<asp:Content ContentPlaceHolderID="ExtraScripts" ID="Scripts" runat="server">
    <script type="text/javascript" src="../../Scripts/Menus.js"></script>
</asp:Content>
